package com.wushi.springcloud.consumer.controller;

import com.wushi.springcloud.consumer.service.HelloRemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wushumin
 * @version 1.0
 * @date 2019-09-23 10:07
 */
@RestController
public class ConsumerController {
    @Autowired
    HelloRemoteService helloRemoteService;
    @GetMapping("/hello")
    public String hello(@RequestParam String name){
        System.out.printf("====>invoke 遠程hello: %s",name);
        return helloRemoteService.helloRemote(name);
    }

}
